package com.my.cd.decorator;

/**
 * 主体与分支共同抽象类
 */
public abstract class Drink {

    public String desc = "";//说明

    private float price = 0f;//价格

    public abstract float cost();//主要的抽象方法

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc + "-" + this.getPrice();
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

}
